/**
 * Copyright (c) suzuki ryoutoku
 * See this code regarding the Apache License Version 2.0
 * @author suzuki ryoutoku
 */

//=============================================================================
//	Protected multiple include
//=============================================================================
#ifndef COORDINATE_H
#define COORDINATE_H

//=============================================================================
//	pre processor
//=============================================================================
#include <iostream>
using namespace std;

#include "Mathematics.h"
#include "include/declare.h"

//=============================================================================
//	Define class
//=============================================================================
/**
 * Represent coordinate
 * \note
 * @author suzuki ryoutoku
 * @date 2007-6-14
 * @version 1.0
 */
class library::mathematics::Coordinate
{
  // closed member
private:
  Vector<double>	 	m_pivot;//!< pivot in world coordinate
  Matrix<double>	   m_matrix;//!< transfer matrix for world coordinate
  Vector<double> m_local_origin;//!< local center's coordinate in world
  Vector<double>		m_scale;//!< coefficient of scaling 

  // opened member
public:
  Coordinate();
  ~Coordinate();

  Vector<double>	transform(const Vector<double>& arg);
#if 0
  void setRotateX(double arg);
  void setRotateY(double arg);
  void setRotateZ(double arg);
#endif

  void settingOpenGL(void);

  // setter & getter (inline)
public:
  void setM_matrix(Matrix<double>& arg){this->m_matrix =arg;}
  Matrix<double>* getM_matrix(void){return &(this->m_matrix);}

  Vector<double>* getM_pivot(void){return &(this->m_pivot);}
  void setM_pivot(const Vector<double>& arg){this->m_pivot= arg;}

  void setM_local_origin(const Vector<double>& arg){this->m_local_origin=arg;}
  Vector<double>* getM_local_origin(void){return &(this->m_local_origin);}

  void setM_scale(const Vector<double>& arg){this->m_scale=arg;}
  Vector<double>* getM_scale(void){return &(this->m_scale);}

};

//=============================================================================
//	include gard
//=============================================================================

#endif
